﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace EncomiendaMVC.Metadata
{
    public class RecursoUtil
    {
        private static global::System.Resources.ResourceManager resourceManSP;
        private static global::System.Resources.ResourceManager resourceManEN;
        private static global::System.Globalization.CultureInfo resourceCulture;

        public RecursoUtil()
        {

        }

        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture
        {
            get
            {
                return resourceCulture;
            }
            set
            {
                resourceCulture = value;
            }
        }

        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManagerSP
        {
            get
            {
                if (object.ReferenceEquals(resourceManSP, null))
                {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EncomiendaMVC.Metadata.ResourceSP", typeof(ResourceSP).Assembly);
                    resourceManSP = temp;
                }
                return resourceManSP;
            }
        }

        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManagerEN
        {
            get
            {
                if (object.ReferenceEquals(resourceManEN, null))
                {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EncomiendaMVC.Metadata.ResourceEN", typeof(ResourceEN).Assembly);
                    resourceManEN = temp;
                }
                return resourceManEN;
            }
        }

        public static string ObtenerMensaje(
            string codigo, string tipoRecurso)
        {
            string mensaje = string.Empty;

            switch (tipoRecurso)
            {
                case "SP": mensaje = ResourceManagerSP.
                    GetString(codigo, resourceCulture);
                    break;
                case "EN": mensaje = ResourceManagerEN.
                    GetString(codigo, resourceCulture);
                    break;
            }

            return mensaje;
        }

    }
}